//编写程序：由键盘输入三个整数分别存入变量num1、num2、num3，实现从小到大输出三个整数。

import java.util.Scanner;

public class practice2_4 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("请输入第一个整数：");
        int num1 = input.nextInt();
        System.out.print("请输入第二个整数：");
        int num2 = input.nextInt();
        System.out.print("请输入第三个整数：");
        int num3 = input.nextInt();
        if (num1 > num2) {
            int temp = num1;
            num1 = num2;
            num2 = temp;
        }
        if (num1 > num3) {
            int temp = num1;
            num1 = num3;
            num3 = temp;
        }
        if (num2 > num3) {
            int temp = num2;
            num2 = num3;
            num3 = temp;
        }
        System.out.println("从小到大为" + num1 + " " +  num2 + " " + num3);
    }
}
